package com.example.yjhadmin.controller;

import com.example.yjhadmin.service.ResultFeign;
import com.yc.yjh.entity.Result;
import com.yc.yjh.entity.Results;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/yjh/admin")
public class ResultController {
    @Resource
    ResultFeign resultFeign;
    @RequestMapping("addResult")
    public Result addResult(@RequestBody Results result){
        return resultFeign.addResult(result);
    }
    @RequestMapping("selectAllResult")
    public List selectAllResult(){
        return resultFeign.selectAllResult();
    }
    @RequestMapping("selectByMid")
    public List selectByMid(@RequestParam("mid") String mid){
        return resultFeign.selectByMid(mid);
    }
}
